<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="/static/build/layui.css" media="all">
<%@include file="/common/common.jspf"%>
<script type="text/javascript"
	src="${ctx}/js/transport/apply/transport_add.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>

</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/transportapply/transport_addEntity.shtml">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">车牌号</label>
				<div class="col-sm-9">

					 <!-- <input type="text" class="form-control" placeholder="请输入车牌号"
						name="transportApplyFormMap.licenseNo" id="licenseNo" />  -->
					
					<select class="form-control selectinfo" id="licenseNo" name="transportApplyFormMap.licenseNo">

					</select>
					
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">发动机号码</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入发动机号码"
						name="transportApplyFormMap.engineNo" id="engineNo" />

				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车架号</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入车架号"
						name="transportApplyFormMap.vehicleNumber" id="vehicleNumber" />

				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车老板姓名</label>
				<div class="col-sm-9">
					<select class="form-control selectinfo" name="transportApplyFormMap.carBossNumber">
						<c:forEach var="key" items="${motorcadeInfoFormMap }">
							<option value="${key.id}">${key.carBossName}</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">购买日期</label>
				<div class="col-sm-9">
					<input type="text" id="buyDate" placeholder="请输入购买日期"
						class="form-control" name="transportApplyFormMap.buyDate" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">签合同日期</label>
				<div class="col-sm-9">
					<input type="text" id="signDate"
						name="transportApplyFormMap.signDate" placeholder="请输入签合同日期"
						class="form-control" />

				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车主联系电话</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入车主联系电话" readonly
						name="transportApplyFormMap.carBossNumber" id="carBossNumber" />

				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>

		</div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">新增</button>
		</footer> </section>
	</form>
	<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
	<script type="text/javascript">
		jeDate({
			dateCell : "#buyDate",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true,
			isClear : false,
			minDate : "2014-09-19 00:00:00"
		})
		jeDate({
			dateCell : "#signDate",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true,
			isClear : false,
			minDate : "2014-09-19 00:00:00"
		})
		$(".selectinfo").change(function() {
				$("#licenseNo").empty();
				var id = $(this).val();
				$.getJSON(rootPath + "/transportapply/transport_id.shtml",
						"id=" + id, function(data) {
							$("#carBossNumber").val(data.carBossNumber);
							if(data.licenseNo){
								$("#licenseNo").append("<option>" + data.licenseNo + "</option>");
							}else{
								$("#licenseNo").append("<option>无</option>");
								return
							}
							
						})
			})
	</script>
</body>
</html>